home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / 1987 / 06 / bbs.l1 next >
Text File  |  1987-05-05  |  780b  |  45 lines

  1. Listing One
  2.  
  3. list
  4.  
  5.  
  6.  
  7. 1    TPATH=/u/bbs/rbin
  8.  
  9.     # check the command argument - $1
  10.     
  11. 2    if [ "$1" = MS]
  12. 3    then
  13.  
  14.     # argument is for MS-DOS files
  15.  
  16. 4        echo 'who am i | cut -f1 -d" " ' 'date | cut -c1-16 ' "MS.list" >>/u/bbs/log.file
  17. 5        echo
  18. 6        more $TPATH/MS.list
  19.  
  20. 7    elif [ "$1" = Mac ]
  21. 8    then
  22.  
  23.     # argument is for Macintosh files
  24.  
  25. 9        echo 'who am i | cut -f1 -d" " ' 'date | cut -c1-16 ' "Mac.list" >>/u/bbs/log.file
  26. 10        echo
  27. 11        more $TPATH/Mac.list
  28.  
  29. 12    elif [ "$1" = Unix ]
  30. 13    then
  31.     
  32.     # argument is for Unix files
  33.  
  34. 14        echo 'who am i | cut -f1 -d" " ' 'date | cut -c1-c16 ' "Unix.list" >>/u/bbs/log.file
  35. 15        echo
  36. 16        more $TPATH/Unix.list
  37. 17    else
  38.  
  39.     # no argument was entered
  40.  
  41. 18        echo
  42. 19        echo "List which directory? (MS, Mac, or Unix)"
  43. 20    fi
  44.  
  45.